home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
xferrev2.arc
/
REVERSE.DOC
< prev
next >
Wrap
Text File
|
1989-02-07
|
1KB
|
34 lines
REVERSE is a quick and dirty utility designed to reverse the
order of lines in an ASCII text file. It is run this way:
REVERSE file.ext
To illustrate the program's operation, assume that the file whose
name is passed to REVERSE contains:
ABC
XYZ
When REVERSE finishes its operation, the file will contain:
XYZ
ABC
REVERSE needs 64K of RAM and enough space in the current
directory to make a temporary copy of the file it operates on.
The program expects to find the file in the current directory and
will place the reordered file in the current directory.
Attempting to use path names in the argument given to REVERSE may
cause unpredictable results. REVERSE reads its input file fairly
quickly. Because the program must reposition the disk head for
each line while the new file is being written, the time required
to write the file is considerably greater.
REVERSE was written specifically to deal with the Exec-PC BBS
XFERn.TXT files. The Turbo C source code is included here. An
examination of the code will reveal the fact that it is indeed
"quick and dirty". Feel free to modify it as you see fit.
Dale Ulmer
Wauwatosa WI
February, 1989